<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>zxxhouse: src/com/soufang/ui/WelcomeActivity.java源文件</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">zxxhouse
   &#160;<span id="projectnumber">1.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- 制作者 Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">src/com/soufang/ui/WelcomeActivity.java</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="keyword">package </span>com.soufang.ui;
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="keyword">import</span> android.app.Activity;
<a name="l00004"></a>00004 <span class="keyword">import</span> android.content.Intent;
<a name="l00005"></a>00005 <span class="keyword">import</span> android.os.Bundle;
<a name="l00006"></a>00006 <span class="keyword">import</span> android.view.animation.AlphaAnimation;
<a name="l00007"></a>00007 <span class="keyword">import</span> android.view.animation.Animation;
<a name="l00008"></a>00008 <span class="keyword">import</span> android.view.animation.Animation.AnimationListener;
<a name="l00009"></a>00009 <span class="keyword">import</span> android.widget.ImageView;
<a name="l00010"></a>00010 
<a name="l00016"></a><a class="code" href="classcom_1_1soufang_1_1ui_1_1_welcome_activity.html">00016</a> <span class="keyword">public</span> <span class="keyword">class </span><a class="code" href="classcom_1_1soufang_1_1ui_1_1_welcome_activity.html" title="欢迎页面">WelcomeActivity</a> <span class="keyword">extends</span> Activity {
<a name="l00017"></a>00017         
<a name="l00018"></a>00018          <span class="keyword">private</span> ImageView welcomeImg = null;
<a name="l00019"></a>00019 
<a name="l00020"></a>00020         @Override
<a name="l00021"></a>00021         <span class="keyword">protected</span> <span class="keywordtype">void</span> onCreate(Bundle savedInstanceState) {
<a name="l00022"></a>00022                 <span class="comment">// TODO Auto-generated method stub</span>
<a name="l00023"></a>00023                 super.onCreate(savedInstanceState);
<a name="l00024"></a>00024                 
<a name="l00025"></a>00025                 setContentView(R.layout.start_animframe);
<a name="l00026"></a>00026                 welcomeImg = (ImageView) this.findViewById(R.id.welcome_img);
<a name="l00027"></a>00027                 AlphaAnimation anima = <span class="keyword">new</span> AlphaAnimation(0.3f, 1.0f);
<a name="l00028"></a>00028                 anima.setDuration(3000);<span class="comment">// 设置动画显示时间 </span>
<a name="l00029"></a>00029                  welcomeImg.startAnimation(anima);  
<a name="l00030"></a>00030                  anima.setAnimationListener(<span class="keyword">new</span> AnimationImpl()); 
<a name="l00031"></a>00031         }
<a name="l00032"></a>00032          
<a name="l00033"></a>00033         <span class="keyword">private</span> <span class="keyword">class </span>AnimationImpl <span class="keyword">implements</span> AnimationListener {  
<a name="l00034"></a>00034                  @Override  
<a name="l00035"></a>00035                 <span class="keyword">public</span> <span class="keywordtype">void</span> onAnimationStart(Animation animation) {  
<a name="l00036"></a>00036                     welcomeImg.setBackgroundResource(R.drawable.startimg);  
<a name="l00037"></a>00037                 }  
<a name="l00038"></a>00038           
<a name="l00039"></a>00039                 @Override  
<a name="l00040"></a>00040                 <span class="keyword">public</span> <span class="keywordtype">void</span> onAnimationEnd(Animation animation) {  
<a name="l00041"></a>00041                     skip(); <span class="comment">// 动画结束后跳转到别的页面  </span>
<a name="l00042"></a>00042                 }  
<a name="l00043"></a>00043           
<a name="l00044"></a>00044                 @Override  
<a name="l00045"></a>00045                 <span class="keyword">public</span> <span class="keywordtype">void</span> onAnimationRepeat(Animation animation) {  
<a name="l00046"></a>00046           
<a name="l00047"></a>00047                 }  
<a name="l00048"></a>00048           
<a name="l00049"></a>00049             }  
<a name="l00050"></a>00050           
<a name="l00051"></a>00051             <span class="keyword">private</span> <span class="keywordtype">void</span> skip() {  
<a name="l00052"></a>00052                 startActivity(<span class="keyword">new</span> Intent(<span class="keyword">this</span>, <a class="code" href="classcom_1_1soufang_1_1ui_1_1_main_activity.html" title="欢迎页面后进入的主页面">MainActivity</a>.class));  
<a name="l00053"></a>00053                 finish();  
<a name="l00054"></a>00054             }  
<a name="l00055"></a>00055         }
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated at 2015年二月4日 星期三 18:11:09 for zxxhouse by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
